//
//  Triton.h
//  Triton
//
//  Created by Tom on 2018/12/3.
//  Copyright © 2018 Tencent. All rights reserved.
//


#import <UIKit/UIKit.h>
#import "TTApplication.h"
#import "TritonSDKDelegate.h"

NS_ASSUME_NONNULL_BEGIN

//! Project version number for Triton.
FOUNDATION_EXPORT double TritonVersionNumber;

//! Project version string for Triton.
FOUNDATION_EXPORT const unsigned char TritonVersionString[];


@interface UserGameData : NSObject
@property (nonatomic, strong) NSString *avatarUrl;
@property (nonatomic, strong) NSString *nickname;
@property (nonatomic, strong) NSString *openid;
@property (nonatomic, strong) NSDictionary *kvDataList;

@end


@interface TritonPerformance : NSObject

@property (nonatomic, strong) NSString* appID;
@property (nonatomic, strong) NSString* startTime;
@property (nonatomic, strong) NSString* endTime;
@property (nonatomic, copy)   NSString* cpuListStr;
@property (nonatomic, copy)   NSString* memListStr;
@property (nonatomic, copy)   NSString* fpsListStr;
@property (nonatomic, copy)   NSString* textureOfflineCountListStr;
@property (nonatomic, copy)   NSString* texLRUCacheSizeListStr;

@property (nonatomic, assign) NSUInteger f_20;
@property (nonatomic, assign) NSUInteger f_33;
@property (nonatomic, assign) NSUInteger f_50;
@property (nonatomic, assign) NSUInteger f_100;
@property (nonatomic, assign) NSUInteger f_long;
@property (nonatomic, assign) double preferredFPS;//开发商限制的帧率
@property (nonatomic, assign) NSUInteger f_max;
@property (nonatomic, assign) NSUInteger f_max_time;
@property (nonatomic, assign) NSUInteger avgMem;
@property (nonatomic, assign) NSUInteger maxMem;
@property (nonatomic, assign) NSUInteger avgCPU;
@property (nonatomic, assign) NSUInteger maxCPU;
@property (nonatomic, assign) NSUInteger avgFPS;
@property (nonatomic, assign) NSUInteger avgFPSVariance;

@end



@interface TritonSDK : NSObject

+ (instancetype) sharedInstance;

@property (nonatomic, weak) id<TritonSDKDelegate> delegate;

/// 是否强制静音
@property (nonatomic, assign) BOOL isForceMuted;

/// 是否遵循物理静音按钮，默认遵循，静音不播放
@property (nonatomic, assign) BOOL isObeyMuteSwitch;

/// 触摸手势回调间隔，单位秒，默认60s
@property (nonatomic, assign) NSTimeInterval touchDetectInterval;

/// 当前游戏的appid
- (NSString *)currentAppId;

/// 当前游戏的appInfo
- (MAAppInfo*)currentAPPInfo;

/// 当前游戏的application
- (TTApplication *)currentApplication;

/// 判断sdk的使用环境
+ (TTCurrentDebugState)currentDebugState;

/// 读取当前小游戏game.json
- (NSDictionary *)gameJSonDic;

/// 读取指定路径的小游戏的game.json
- (NSDictionary *)gameJSonDicWithPkgPath:(NSString *)pkgPath;

/// 根据appId获取TTApplication，只从当前和后台的小程序
- (TTApplication *)applicationFromCurrentOrProtectForAppId:(NSString *)appId;

/// 小游戏日志地址
- (NSString *)logPath;

@end

NS_ASSUME_NONNULL_END


